from django.conf.urls import url
from django.contrib import admin
from . import views

from rest_framework.routers import DefaultRouter

urlpatterns = [
    url(r'^categories/(?P<pk>\d+)/skus/', views.SKUListView.as_view()),
]

# 通过REST framework的router来定义路由
defaul = DefaultRouter()
defaul.register('skus/search',views.SKUSearchView, base_name='skus_search')

urlpatterns +=defaul.urls